home *** CD-ROM | disk | FTP | other *** search
- /* ln_check.awk BASIC-list line-number checker */
- /* check null lines */
- /* check lines in illegal order */
- BEGIN{
- errnum=0; /* number of error-lines */
- pl=0; /* previous line number */
- ln=0; /* number of lines */
- }
-
- {
- ln++
- if (NF == 1){
- printf("ERR:null line in line%6d\n",ln)
- errnum += 1
- }
- else if (pl >= $1){
- printf("ERR:illegal order in line%6d(%6d -> %6d)\n",ln,pl,$1)
- errnum += 1
- }
- pl = $1
- }
-
- END{
- printf("Number of errors:%d\n",errnum);
- }